<template>
    <header class="header">
        <i  :class="['iconfont', this.isBack ? 'icon-youhuafanhui' : 'icon-cha']" @click="back"></i>
        <h1>{{value}}</h1> 
    </header>
</template>

<script>
export default {
    data () {
        return {
        };
    },

    props: {
        value: {
            type: String,
            default: ''
        },
        isBack: {
            type: Boolean,
            default: true
        }
    },

    methods: {
        back() {
            this.$router.go(-1);
        }
    }
};

</script>
<style lang='stylus' scoped>
.header
    position relative
    height 100px
    line-height 100px
    text-align center
    background-color #fff
    -webkit-backface-visibility hidden
    backface-visibility hidden
    z-index 5
    box-sizing border-box
    padding 0 15px
    h1
        font-size 30px
    .iconfont
        float left
        font-size 40px
    .icon-cha
        margin-left 20px
</style>